// Needs refactoring
// Sub nav
.subnav {
  margin-bottom: 20px;

  @include clearfix();

  .subnav-sorting {
    float: right;
    color: #aaa;

    .btn-link {
      color: rgb(68, 68, 68) !important;
      padding-bottom: 4px;
      border-bottom: 1px solid transparent !important;
    }

    .divider {
      color: #ddd;
      margin: 0 3px;
    }

    .btn-link.selected {
      color: #333 !important;
      border-color: #ddd !important;
      &:hover {
        text-decoration: none;
      }
    }
  }
}

.subnav-bordered {
  padding-bottom: 20px;
  border-bottom: 1px solid $input-border-color;
}

.subnav-flush {
  margin-bottom: 0;
}

.subnav-item {
  position: relative;
  float: left;
  padding: 8px 14px;
  font-weight: bold;
  line-height: 20px;
  color: $text-gray;
  border: 1px solid $input-border-color;

  + .subnav-item {
    margin-left: -1px;
  }

  &:hover,
  &:focus {
    text-decoration: none;
    background-color: #f7f7f7;
  }

  &.selected,
  &.selected:hover,
  &.selected:focus {
    z-index: 2;
    color: $primary;
    border-color: $input-border-color;
  }

  &:first-child {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }

  &:last-child {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
  }
}

.subnav-search {
  position: relative;
  margin-left: 10px;
}

.subnav-search-input {
  padding-left: 30px;
  color: $text-gray;
}

.subnav-search-input-wide {
  width: 500px;
}

.subnav-search-icon {
  position: absolute;
  top: 11px;
  left: 8px;
  display: block;
  color: #ccc;
  text-align: center;
  pointer-events: none;
}
